<%@ page contentType="text/html;charset=UTF-8" language="java"  import="java.util.*" trimDirectiveWhitespaces="true" %>
<%@include file="/WEB-INF/pages/common/taglib.jsp"%>
<head>
    <title>商城订单详情</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <%@include file="/WEB-INF/pages/common/commonCss.jsp"%>
    <link rel="stylesheet" href="${basePath}/resources/css/fullcalendar.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/matrix-style.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/matrix-media.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/jquery.gritter.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/admin/showImg.css" />



</head>
<style>
    *{
        font-family: "微软雅黑";
        font-size: 12px;
    }
    .widget-box li{
        line-height: 50px;
    }
    .widget-box  li{
        line-height: 50px;
    }
    .widget-box .info li{
        line-height: 20px;
    }
    .widget-box  .user-thumb{
        height: 100px;
        width: 100px;
    }
    .totalprice{
        padding:5px 10px;
        float: right;
    }
    .red{
        color:red;
    }
    .paddingR20{
        padding-right: 20px;
    }


</style>
<body>

<!--Header-part-->

<!--close-top-serch-->
<%@include file="/WEB-INF/pages/common/head.jsp"%>

<!--sidebar-menu-->
<%@include file="/WEB-INF/pages/common/left.jsp"%>
<!--sidebar-menu-->

<!--main-container-part-->
<div id="content">
    <!--breadcrumbs-->
    <div id="content-header">
        <div id="breadcrumb">
            <a href="${adminPath}/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 首页</a>
            <a href=""  class="tip-bottom"> 商城订单详情</a>
        </div>
    </div>
    <!--End-breadcrumbs-->

    <!--Action boxes-->
    <div class="container-fluid">

        <!--End-Chart-box-->
        <hr/>
        <div class="row-fluid">
            <div class="span6">
                <div class="widget-box" style="overflow: hidden">

                    <div class="widget-title"><span class="icon"><i class="icon-user"></i></span>
                        <h5>会员信息</h5>
                    </div>
                    <div class="widget-content nopadding fix_hgt">
                        <ul class="recent-posts">
                            <li>
                                <div class="user-thumb"> <img width="100" height="100" alt="User" src="${order.headimgurl}"> </div>
                                <div class="article-post">
                                    <span class="user-info paddingR20" >昵称: ${order.nickname}</span>
                                    <span class="user-info">手机: ${order.phone}</span>
                                    <p>地区:${order.country} ${order.province} ${order.city}  </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>


                <div class="widget-box">
                    <div class="widget-title">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="#tab1">订单信息</a></li>
                            <li><a data-toggle="tab" href="#tab2">收货信息</a></li>
                        </ul>
                    </div>
                    <div class="widget-content tab-content">
                        <div id="tab1" class="tab-pane active">
                            <img src="${order.qrcode_url}" alt=""/>
                            <p><span class="paddingR20">下单编号:</span>${order.orderno} </p>
                            <p><span class="paddingR20">下单时间:</span>${tz:formatDate(order.create_time,'yyyy-MM-dd HH:mm:ss')} </p>
                            <p><span class="paddingR20">订单状态:</span>${order.orderstatus} </p>
                            <p><span class="paddingR20">下单价格:</span><span class="red">￥ ${order.totalprice==null?'暂无':(tz:formatDouble(order.totalprice))}</span> </p>
                            <p><span class="paddingR20">下单数量:</span>${order.totalnum} </p>
                            <p><span class="paddingR20">实付金额:</span><span class="red">￥  ${order.actualpayprice==null?'暂无':(tz:formatDouble(order.actualpayprice))} </span> </p>
                        </div>
                        <div id="tab2" class="tab-pane">
                            <p>收货地址: ${order.user_name},${order.tel_number} ,${province_name} ${order.city_name}  ${order.country_name} ${order.detail_info} ${order.user_name} ${order.user_name}</p>
                            <p>运送方式:</p>
                            <p>物流公司名称: ${order.logisticCompany}</p>
                            <p>运单号: ${order.logisticsno}</p>
                        </div>
                    </div>
                </div>

                <div class="widget-box">
                    <div class="widget-title">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="#tab3">买方物流信息</a></li>
                            <li><a data-toggle="tab" href="#tab4">平台物流信息</a></li>
                        </ul>
                    </div>
                    <div class="widget-content tab-content">
                        <div id="tab3" class="tab-pane active">
                            <c:if test="${order.userlogisticsno!=null}" >
                                <h6><span>快递公司: ${order.userlogisticCompany}</span><span style="padding-left:2rem">单号: ${order.userlogisticsno}</span></h6>
                            </c:if>
                            <input type="hidden" value="${order.userlogisticsno}" id="userlogisticsno">
                            <input type="hidden" value="${order.userlogisticsnoComp}" id="userlogisticsnoComp">
                            <div class="paddingR20"><p>暂无物流信息</p></div>
                        </div>
                        <div id="tab4" class="tab-pane">
                            <c:if test="${order.logisticsno!=null && order.logisticsnoComp!=null}" >
                                <h6>
                                    <span>快递公司: ${order.logisticCompany}</span><span style="padding-left:2rem">单号: ${order.logisticsno}</span>
                                    <span style="padding-left:2rem">
                                        <a href="${adminPath}/order/editLogistinfo/${order.orderno}/${order.type}"> <i class="iconfont icon-edit" title="编辑"></i></a>
                                    </span>
                                </h6>
                            </c:if>
                            <input type="hidden" value="${order.logisticsno}" id="logisticsno">
                            <input type="hidden" value="${order.logisticsnoComp}" id="logisticsnoComp">
                            <div class="paddingR20"><p>暂无物流信息</p></div>
                        </div>

                    </div>
                </div>


            </div>

            <div class="span6">

                <div class="widget-box">
                    <div class="widget-title bg_ly" data-toggle="collapse" href="#collapseG2"><span class="icon"><i class="icon-chevron-down"></i></span>
                        <h5>商品信息</h5>
                    </div>
                    <div class="widget-content nopadding collapse in" id="collapseG2">
                        <ul class="recent-posts">
                            <c:forEach items="${gooddetails}" var="item">
                                <li>
                                    <div class="user-thumb" >
                                        <img width="100" height="100" alt="User" src="${item.bannerurl}">
                                    </div>
                                    <div class="article-post" >
                                        <dl>
                                            <dd>
                                                 <span class="user-info">标题：${item.title}&nbsp;
                                                <span style="float: right;color:red">￥ ${item.unitPrice==null?'暂无':(tz:formatDouble(item.unitPrice))}</span>
                                             </span>
                                            </dd>
                                            <dd>编号: ${item.goodno}</dd>
                                            <dd>商品分类：${item.color}【${item.weight}】${item.material} ${item.mainstorespec?"【"+item.mainstorespec+"】":""} ${item.handsize} ${item.necklace_len?"【约"+item.necklace_len+"】":""}      ${item.bracelet_len?"【约"+item.bracelet_len+"】":""}</dd>
                                            <dd style="float: right;">X ${item.num}</dd>
                                        </dl>
                                        <%--<span class="user-info">标题：${item.title}&nbsp;--%>
                                            <%--<span style="float: right;color:red">￥ ${item.unitPrice==null?'暂无':(tz:formatDouble(item.unitPrice))}</span>--%>
                                        <%--</span>--%>
                                        <%--<span class="user-info" style="clear:both"> 编号: ${item.goodno}   </span>--%>
                                          <div style="clear:both;"></div>
                                        <%--<p>颜色分类 :<a href="#">${item.color}【${item.weight}】${item.material} ${item.mainstorespec?"【"+item.mainstorespec+"】":""} ${item.handsize} ${item.necklace_len?"【约"+item.necklace_len+"】":""}      ${item.bracelet_len?"【约"+item.bracelet_len+"】":""}</a>--%>

                                        <%--<span style="float: right;">X ${item.num}</span></p>--%>
                                    </div>

                                </li>
                            </c:forEach>
                            <p style="float: right" class="totalprice">总金额: <span class="red">￥ ${order.totalprice==null?'暂无':(tz:formatDouble(order.totalprice))} </span> </p>
                        </ul>
                    </div>
                </div>

                <div class="widget-box">
                    <div class="widget-title bg_lg"><span class="icon"><i class="icon-signal"></i></span>
                        <h5>待办事项</h5>
                    </div>
                    <div class="widget-content" >
                        <div class="row-fluid">

                            <div class="span12">
                                <ul class="site-stats">
                                    <c:if test="${order.shoporderstatusCode=='002'}">
                                        <li class="bg_lh">
                                            <a href="${adminPath}/order/addOrderPicture/${order.orderno}/${order.type}/${order.openid}"><i class="icon-tag"></i><strong>发货</strong></a>
                                        </li>
                                    </c:if>
                                    <c:if test="${order.shoporderstatusCode=='007'}">
                                        <li class="bg_lh">
                                            <a href="" data-toggle="modal" data-target="#myModal"><i class="icon-shopping-cart"></i> <strong>同意退款</strong></a>
                                        </li>
                                    </c:if>
                                    <c:if test="${order.shoporderstatusCode=='009'}">
                                        <li class="bg_lh">
                                            <a href="" data-toggle="modal" data-target="#myModal2"><i class="icon-shopping-cart"></i> <strong>退款</strong></a>
                                        </li>
                                    </c:if>

                                    <c:if test="${order.shoporderstatusCode!='002' && order.shoporderstatusCode!='007' && order.shoporderstatusCode!='009'}">
                                        暂无
                                    </c:if>
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>

            </div>



        </div>
    </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">是否同意退款</h4>
            </div>
            <div class="modal-body">
                <p><lable><input type="radio" value="001" name="confirmRefund" checked>  是</lable></p>
                <p><lable><input type="radio" value="002" name="confirmRefund">  否</lable></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary"  onclick="handler.confirmRefund(this,'${order.orderno}','${order.type}')">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel2">退款金额确认</h4>
            </div>
            <div class="modal-body">
                <p class="row-fluid"><span class="span3">会员昵称</span> <input type="text"   style="height: 2rem;" class="span7" value="${order.nickname}" readonly></p>
                <p class="row-fluid"><span  class="span3">退款金额(单位:￥)</span> <input type="number"    style="height: 2rem;" class="span7" value="${order.actualpayprice}" readonly></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭  </button>
                <button type="button" class="btn btn-primary"  onclick="handler.confirmRefundMoney(this,'${order.orderno}','${order.type}','${order.userId}','${order.actualpayprice}')">
                    确定
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>



<div id="showImg" style="display: none;">
    <img src="" alt="" class="box"/>
</div>

<!--end-main-container-part-->

<!--Footer-part-->
<%@include file="/WEB-INF/pages/common/footer.jsp"%>
<!--end-Footer-part-->

<%@include file="/WEB-INF/pages/common/commonJS.jsp"%>
<script src="${basePath}/resources/js/excanvas.min.js"></script>
<script src="${basePath}/resources/js/jquery.ui.custom.js"></script>
<script src="${basePath}/resources/js/bootstrap.min.js"></script>
<script src="${basePath}/resources/js/jquery.flot.min.js"></script>
<script src="${basePath}/resources/js/jquery.flot.resize.min.js"></script>
<script src="${basePath}/resources/js/jquery.peity.min.js"></script>
<script src="${basePath}/resources/js/fullcalendar.min.js"></script>
<script src="${basePath}/resources/js/matrix.js"></script>
<script src="${basePath}/resources/js/matrix.dashboard.js"></script>
<script src="${basePath}/resources/js/jquery.gritter.min.js"></script>
<script src="${basePath}/resources/js/matrix.interface.js"></script>
<script src="${basePath}/resources/js/matrix.chat.js"></script>
<script src="${basePath}/resources/js/jquery.validate.js"></script>
<script src="${basePath}/resources/js/matrix.form_validation.js"></script>
<script src="${basePath}/resources/js/jquery.wizard.js"></script>
<script src="${basePath}/resources/js/jquery.uniform.js"></script>
<script src="${basePath}/resources/js/select2.min.js"></script>
<script src="${basePath}/resources/js/matrix.popover.js"></script>
<script src="${basePath}/resources/js/jquery.dataTables.min.js"></script>
<script src="${basePath}/resources/js/matrix.tables.js"></script>
<script src="${basePath}/resources/js/admin/showImg.js"></script>
<script src="${basePath}/resources/js/admin/handler.js"></script>


<script type="text/javascript">
    $(function () {
        imgerr.init();
    })

    // 这个函数是从弹出菜单中调用来传递的
    // 不同的页面。忽略返回的值是一个空字符串：
    function goPage (newURL) {

        // 如果URL是空的，跳过菜单分隔和菜单选择重置为默认
        if (newURL != "") {
            //如果网址是“-”，它是这个页面-重置菜单：
            if (newURL == "-" ) {
                resetMenu();
            }
            // 其他的，发送页面到指定的网址
            else {
                document.location.href = newURL;
            }
        }
    }

    // 重置菜单选择进入这个页面:
    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }


</script>
<script>
    imgerr.init();
    handler.getExpress();
</script>
</body>
</html>
